package com.e3.sysmg.config.client;

import java.util.List;

import com.e3.sysmg.config.model.ParameterModel;
import com.e3.sysmg.config.model.ParameterQC;
import com.e3.sysmg.config.model.ParameterTreeModel;
import com.e3.web.core.client.RPCServiceHelper;
import com.e3.web.core.client.WebException;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

public interface ParameterRPCService extends RemoteService {
	
	public static class Util {

		private static ParameterRPCServiceAsync instance;

		public static ParameterRPCServiceAsync getInstance() {
			instance = (ParameterRPCServiceAsync) RPCServiceHelper.getService(ParameterRPCService.class.getName());
			if (instance == null) {
				instance = GWT.create(ParameterRPCService.class);
				RPCServiceHelper.registerServiceEntryPoint(instance);
			}
			return instance;
		}

	}
	public ParameterModel newParameter(ParameterModel model) throws WebException;
	
	public ParameterModel modifyParameter(ParameterModel model) throws WebException;
	
	public List<ParameterModel> getParameterByCondition(ParameterQC qc) throws WebException;
	
	public void deleteParameters(List<ParameterModel> models) throws WebException;

	public List<ParameterTreeModel> getParameterTypes(ParameterTreeModel model) throws WebException;
}
